package com.cpj.bsyyzx.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cpj.bsyyzx.entity.NurseClass;
import com.cpj.bsyyzx.entity.NurseRecord;
import com.cpj.bsyyzx.mapper.NurseRecordMapper;
import com.cpj.bsyyzx.service.INurseRecordService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 五个臭皮匠
 * @since 2021-04-27
 */
@Service
public class NurseRecordServiceImpl extends ServiceImpl<NurseRecordMapper, NurseRecord> implements INurseRecordService {
    @Override
    public Page pageList(Page page,  NurseRecord  nurseRecord) {
        if (page==null)
        {
            page=new Page();
        }
        QueryWrapper wrapper = new QueryWrapper();
        if (nurseRecord !=null &&!StringUtils.isEmpty((nurseRecord.getCustomer()))){
            wrapper.like("customer",nurseRecord.getCustomer());
        }
        return super.page(page,wrapper);
    }
}
